package service.impl;

import service.TextField;

/**
 * Windows风格文本框 - 具体产品B1
 */
public class WindowsTextField implements TextField {
    private String text;
    private String placeholder;
    
    @Override
    public void render() {
        System.out.println("渲染Windows风格文本框");
        System.out.println("  - 单线边框");
        System.out.println("  - 白色背景");
        if (placeholder != null && (text == null || text.isEmpty())) {
            System.out.println("  - 灰色占位符: " + placeholder);
        } else {
            System.out.println("  - 文本: " + text);
        }
    }
    
    @Override
    public void setText(String text) {
        this.text = text;
    }
    
    @Override
    public String getText() {
        return text;
    }
    
    @Override
    public void setPlaceholder(String placeholder) {
        this.placeholder = placeholder;
    }
}